package com.foreknow.demo8;

/**
 * 动物类
 */
public abstract class Pet {
    private String name;
    private int age;
    private String color;
    private int health;
    private int love;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public int getLove() {
        return love;
    }

    public void setLove(int love) {
        this.love = love;
    }

    //将此方法定义为一个抽象的方法(只有方法的声明没有实现{})
    //如果一个类中只有要一个抽象方法，那么这个类一定要定义为抽象类
    public abstract void toHospital();

    public abstract void eat();
}
